<?php
require_once '../sub/init.php';
require_once ZEAI.'sub/conn.php';
$jumpurl = a('{"kind":"315"}');
if (!ifint($uid))zeaialert('{"title":"会员不存在或已经服务成功1","btnt":"我知道了","url":"-1"}');
if ($uid == $cook_uid)zeaialert('{"title":"亲，你想干嘛，举报自己？","btnt":"我知道了，哈哈","url":"-1"}');
/*是否登录*/
if(!iflogin())header("Location: ".a('{"kind":"login"}').'?jumpurl='.$jumpurl);
require_once ZEAI.'sub/ZeaiUP.php';
switch ($submitok) {
	case 'addupdate':
		if ($kind == $cook_315_kind && $content == $cook_315_content)json_exit(array('flag'=>0,'msg'=>'请不要重复提交'));
		$content= dataIO($content,'in',1000);
		$url    = dataIO($jumpurl,'in',200);
		$picurl = dataIO($picurl,'in',200);
		$kind   = dataIO($kind,'in',20);
		u_pic_reTmpDir_send($picurl,'315');
		$picurl = str_replace('tmp','315',$picurl);
		$db->query("INSERT INTO ".__TBL_315__."  (uid,senduid,kind,content,url,picurl,addtime) VALUES ($uid,$cook_uid,'$kind','$content','$url','$picurl',".ADDTIME.")");
		setcookie("cook_315_kind",$kind,time()+7200000,"/",$_ZEAI['CookDomain']);
		setcookie("cook_315_content",$content,time()+7200000,"/",$_ZEAI['CookDomain']);
		json_exit(array('flag'=>1,'msg'=>'举报成功！我们将审查您的举报信息'));
	break;
}
$row = $db->ROW(__TBL_USER__,"uname,sex,nickname,areatitle,birthday,photo_s,photo_f","(flag=1 OR flag=-2) AND id=".$uid,"name");
if ($row){
	$uname     = dataIO($row['uname'],'out');
	$nickname  = dataIO($row['nickname'],'out');
	$sex       = $row['sex'];
	$birthday  = $row['birthday'];
	$photo_s   = $row['photo_s'];
	$photo_f   = $row['photo_f'];
	$birthday   = (!ifdate($birthday))?'':$birthday;
	$birthday_str  = (@getage($birthday)<=0)?'':@getage($birthday).'岁 ';
	$areatitle  = dataIO($row['areatitle'],'out');
	$nickname_str = (!empty($nickname))?$nickname:$uname;
	if (!empty($photo_s) && $photo_f == 1){
		$photo_s_url = UP.$photo_s;
		$photo_s_str = '<img src="'.$photo_s_url.'">';
	}else{
		$photo_s_url = RES.'photo_s'.$sex.'.png';
		$photo_s_str = '<img src="'.$photo_s_url.'">';
	}
}else{
	zeaialert('{"title":"会员不存在或已经服务成功2","btnt":"我知道了","url":"-1"}');	
}
?>
<!doctype html><html><head><meta charset="utf-8">
<title>用户举报中心-<?php echo $_ZEAI['siteName'];?></title>
<?php echo HEADMETA; ?>
<link href="<?php echo RES;?>m/css/m.css?<?php echo $_ZEAI['cache_str'];?>" rel="stylesheet" type="text/css" />
<link href="<?php echo HOST;?>/cache/zeaicolor.css?<?php echo $_ZEAI['cache_str'];?>" rel="stylesheet" type="text/css" />
<script src="<?php echo RES;?>www_zeai_cn.js?<?php echo $_ZEAI['cache_str'];?>"></script>
<script src="<?php echo RES;?>m/js/m.js?<?php echo $_ZEAI['cache_str'];?>"></script>
<?php if (is_weixin()){
	require_once ZEAI."api/weixin/jssdk.php";
	$share_u_title = $share_u_title.'.'.$_ZEAI['siteName'];?>
	<script src="<?php echo RES;?>jweixin-1.2.0.js"></script>
	<script>wx.config({debug:false,appId: '<?php echo $signPackage["appId"];?>',timestamp: <?php echo $signPackage["timestamp"];?>,nonceStr: '<?php echo $signPackage["nonceStr"];?>',signature: '<?php echo $signPackage["signature"];?>',jsApiList:['chooseImage','uploadImage','previewImage']});</script>
<?php }?>
<style>
.jubao{padding:1rem 0 5rem;margin-top:4rem}
.jubao .udata{background-color:#f0f0f0;padding:0 0 2rem 0}
.jubao .udata ul{background-color:#fff;border-bottom:#f0f0f0 1.2rem solid}
.jubao .udata ul li:last-child{border:0}
.jubao dl{width:100%;margin:0 auto;border-bottom:#eee 1px solid;padding:1rem 0;text-align:left;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}
.jubao dl:last-child{border-bottom:0}
.jubao dl dt,dl dd{line-height:3rem}
.jubao dl dt{width:90%;margin:0 5%;font-size:1.8rem;font-weight:bold}
.jubao dl dd{width:90%;margin:0 auto;position:relative;padding:.5rem 0}
.jubao dl dd h3 span{font-size:1.4rem}
.jubao dl dd.rdo{padding-left:1.5rem;box-sizing:border-box}
.jubao dl dd.photo_s{padding:1rem 0 0 9rem;height:8rem;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}
.jubao dl dd.photo_s img{position:absolute;left:1.5rem;top:1rem;width:6rem;height:6rem;border-radius:3rem;object-fit:cover;-webkit-object-fit:cover}
.jubao dl dd textarea{width:100%;height:8rem}
.jubao dl dd em{line-height:normal;font-size:1.2rem;color:#8d8d8d;margin:.5rem 0}
.jubao button{width:90%;margin:2rem auto;display:block}
.jubao textarea{width:100%:background-color:#f9f9f9;border:#f0f0f0 1px solid;box-sizing:border-box;padding:.5rem;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}
::-webkit-input-placeholder {color:#aaa;font-size:1.4rem}
.icoadd,.icoadd img{width:6rem;height:6rem;display:block}
.icoadd{line-height:6rem;border:#dedede 1px solid;font-size:4rem;text-align:center;color:#aaa}
.size4{box-shadow:0 .3rem .8rem rgba(<?php echo c16_rgb($_ZEAI['mob_mbcolor']);?>,.4)}
</style>
</head><body>
<?php
$mini_title='举报中心';
require_once ZEAI.'m/top_mini.php';?>
<form id="ZEAI_FORM_315" class="jubao">
<dl>
    <dt>举报对象</dt>
    <dd class="photo_s"><?php echo $photo_s_str;?><h3><?php echo $nickname_str;?>　<span>ID：<?php echo $uid;?></span></h3><h6><?php echo $birthday_str.$areatitle;?></h6></dd>
</dl>
<dl><dt>举报内容</dt>
    <dd class="rdo">
    <input type="radio" name="kind" value="一夜情" id="jb1" class="radioskin"><label for="jb1" class="radioskin-label"><i class="i1"></i><b class="W100">一夜情</b></label>
    <input type="radio" name="kind" value="花篮托" id="jb2" class="radioskin"><label for="jb2" class="radioskin-label"><i class="i1"></i><b class="W100">花篮托</b></label>
    <input type="radio" name="kind" value="对方借钱" id="jb3" class="radioskin"><label for="jb3" class="radioskin-label"><i class="i1"></i><b class="W100">对方借钱</b></label>
    <input type="radio" name="kind" value="发广告" id="jb4" class="radioskin"><label for="jb4" class="radioskin-label"><i class="i1"></i><b class="W100">发广告</b></label>
    <input type="radio" name="kind" value="性交易" id="jb5" class="radioskin"><label for="jb5" class="radioskin-label"><i class="i1"></i><b class="W100">性交易</b></label>
    <input type="radio" name="kind" value="酒托茶托饭托" id="jb6" class="radioskin"><label for="jb6" class="radioskin-label"><i class="i1"></i><b class="W100">酒托茶托饭托</b></label>
    <input type="radio" name="kind" value="盗窃" id="jb7" class="radioskin"><label for="jb7" class="radioskin-label"><i class="i1"></i><b class="W100">盗窃</b></label>
    <input type="radio" name="kind" value="恶意中伤" id="jb8" class="radioskin"><label for="jb8" class="radioskin-label"><i class="i1"></i><b class="W100">恶意中伤</b></label>
    <input type="radio" name="kind" value="已婚" id="jb9" class="radioskin"><label for="jb9" class="radioskin-label"><i class="i1"></i><b class="W100">已婚</b></label>
    <input type="radio" name="kind" value="中奖信息" id="jb10" class="radioskin"><label for="jb10" class="radioskin-label"><i class="i1"></i><b class="W100">中奖信息</b></label>
    <input type="radio" name="kind" value="冒充管理员" id="jb11" class="radioskin"><label for="jb11" class="radioskin-label"><i class="i1"></i><b class="W100">冒充管理员</b></label>
    <input type="radio" name="kind" value="资料虚假" id="jb12" class="radioskin"><label for="jb12" class="radioskin-label"><i class="i1"></i><b class="W100">资料虚假</b></label>
    <input type="radio" name="kind" value="婚介" id="jb13" class="radioskin"><label for="jb13" class="radioskin-label"><i class="i1"></i><b class="W100">商家婚介</b></label>
    <input type="radio" name="kind" value="其他" id="jb14" class="radioskin"><label for="jb14" class="radioskin-label"><i class="i1"></i><b class="W100">其他</b></label>
    </dd>
</dl>
<dl>
    <dt>举报截图</dt>
    <dd><p class="icoadd" id="jubaopic"><i class="ico">&#xe609;</i></p></dd>
</dl>
<dl><dt>详细描述</dt>
<dd><textarea id="content" name="content" maxlength="1000" class="textarea" placeholder="请如实详细描述事情经过.."><?php echo $aboutus; ?></textarea>
<em>请留下相关详细证据说明，以便我们核查。如果举报属实，将有机会奖励<?php echo $_ZEAI['loveB']; ?>1000以上或免费升级至VIP会员。</em>
</dd></dl>
<input type="hidden" name="submitok" value="addupdate" />
<input type="hidden" name="picurl" id="picurl" value="" />
<input type="hidden" name="uid" value="<?php echo $uid;?>" />
<input type="hidden" name="jumpurl" value="<?php echo $_SERVER['HTTP_REFERER'];?>" />
<button type="button" class="btn size4 zeaibg yuan B" id="tj315">立即提交</button>
</form>
<script src="<?php echo RES;?>m/js/ZeaiUP.js?<?php echo $_ZEAI['cache_str'];?>"></script>
<script>
var browser='<?php echo browser();?>',upMaxMB = <?php echo $_UP['upMaxMB']; ?>,up2='<?php echo $_ZEAI['up2'];?>/';
ZeaiUP.one({url:'315'+zeai.ajxext+'uid=<?php echo $uid;?>',submitokBef:'ajax_315_',btnobj:jubaopic,end:function(e){
	if(e.flag==1){
		jubaopic.html('<img src='+up2+e.dbname+'>');
		picurl.value=e.dbname;
	}else{
		zeai.msg(e.msg);
	}
}});
tj315.onclick=function(){
	if (!zeai.form.ifradio('kind')){zeai.msg('请选择举报内容');return false;}
	var str = o("content").value;
	if(zeai.str_len(str)>1000){zeai.msg('详细描述请不要超过1000字节',content);return false;}
	zeai.ajax({url:HOST+'/m/315'+zeai.extname,form:ZEAI_FORM_315},function(e){var rs=zeai.jsoneval(e);
		zeai.msg(rs.msg);
		setTimeout(function(){history.back();},1000);
	});
}
</script>
</body></html>